ihelpuoo.namespace("ihelpuoo.widget.list");

ihelpuoo.widget.list.PagerView = function(gasket,patternName)
{
	this.view = new ihelpuoo.widget.View(gasket,patternName);
	this.oFirst = null;
	this.oLast = null;
	this.oPrev = null;
	this.oNext = null;
	this.oGoto = null;
	this.oPn = null;
	this.oPageSize = null;
	this.oRnum = null;
	this.oPnum = null;
}

ihelpuoo.widget.list.PagerView.prototype
=
{
	draw: function(obj)
	{
		if(this.view.isNeverBeDrawn())
		{
			this.view.preparePattern();
			this.oFirst = this.view.getElement("first");
			this.oLast = this.view.getElement("last");
			this.oPrev = this.view.getElement("prev");
			this.oNext = this.view.getElement("next");
			this.oGoto = this.view.getElement("goto");
			this.oPn = this.view.getElement("pn");
			this.oPageSize = this.view.getElement("pagesize");
			this.oRnum = this.view.getElement("rnum");
			this.oPnum = this.view.getElement("pnum");
		}
		this.view.display();
		if(obj)
		{
			ihelpuoo.dom.autoSetObject(this.oPn,obj.pn);
			ihelpuoo.dom.autoSetObject(this.oRnum,obj.rnum);
			ihelpuoo.dom.autoSetObject(this.oPnum,obj.pnum);
			ihelpuoo.dom.autoSetObject(this.oPageSize,obj.pagesize);
		}
	}

	// <WEBOO:INHERIT extends="ihelpuoo.widget.View">
	,getElement: function(key){return this.view.getElement(key);}
	,isNeverBeDrawn: function(){return this.view.isNeverBeDrawn();}
	,preparePattern: function(){this.view.preparePattern();}
	,display: function(){this.view.display();}
	,hide: function(){this.view.hide();}
	,set: function(key,value){this.view.set(key,value);}
	,getString: function(key,defValue){return this.view.getString(key,defValue);}
	,getInt: function(key,defValue){return this.view.getInt(key,defValue);}
	,getBoolean: function(key,defValue){return this.view.getBoolean(key,defValue);}
	,addEvent: function(key,eventName,fnHandler,bCapture){this.view.addEvent(key,eventName,fnHandler,bCapture);}
	,removeEvent: function(key,eventName,fnHandler,bCapture){this.view.removeEvent(key,eventName,fnHandler,bCapture);}
	// </WEBOO:INHERIT>
}